package user

import (
	"gin.andbridge/core/dao"
	"gin.andbridge/core/ipc"
	"gin.andbridge/core/service"
	"gin.andbridge/utils/response"
	"github.com/gin-gonic/gin"
)

type User struct {
}

//

func (user *User) GetUserName(ctx *gin.Context) {
	params := ipc.Export.ReceiveUserId(ctx)

	userName := dao.Export.FindUserNameById(params.Id)

	res := service.Export.HandleUser(userName)
	response.Success(ctx, res)
}
